package snippet;

import java.util.Arrays;
import java.util.Scanner;


class Rectangle {
	int width;
	int length;
	
	public Rectangle(int width,int length) {
		this.width=width;
		this.length=length;
	}
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
}

 class Circle {
	private int radius;
	
	public Circle(int radius) {
		this.radius=radius;
	}
	public int getRadius() {
		return radius;
	}

	public void setRadius(int radius) {
		this.radius = radius;
	}
	
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
}
 
 public class Main2 {
		public static void main(String[] args) {
			Scanner in=new Scanner(System.in);
			Rectangle[] rectangle=new Rectangle[2];
			int c=0,s=0;
			for (int i = 0; i < rectangle.length; i++) {
				Rectangle rectangle1=new Rectangle(in.nextInt(),in.nextInt());
				rectangle[i]=rectangle1;
			    c+=getPerimeter(rectangle[i].width,rectangle[i].length);
			    s+=getArea(rectangle[i].width,rectangle[i].length);
			 }
			Circle[] circle=new Circle[2];
			for (int i = 0; i < circle.length; i++) {
				Circle circle1=new Circle(in.nextInt());
				circle[i]=circle1;
				c+=getPerimeter1(circle[i].getRadius());
				s+=getArea1(circle[i].getRadius());
			 }
			System.out.println(c);
			System.out.println(s);
			System.out.println(Arrays.deepToString(rectangle));
			System.out.println(Arrays.deepToString(circle));
		}
		private static int getArea1(int radius) {
			return (int)(Math.PI*radius*radius);
		}
		private static int getPerimeter1(int radius) {
			return (int)(Math.PI*radius*2);
		};
        
		public static  int getPerimeter(int width,int length)
		{
			return (width+length)*2;
		}
		public static int getArea(int width,int length)
		{
			return width*length;
		}
 }
	